const weRequest = require('../utils/weRequest')
const API = {
  repeatHistoryPush:"studyTask/repeatHistoryPush", 
  getSubscribeMsg:"mps/getSubscribeMsg",
  hasExitWXInfo:"wxopenInfo/hasExitWXInfo",// 是否存在微信用信息，用于头像及昵称更新
  vsTranslation:"vs/translation",// 有道词典翻译
  getFederationToken:"soe/getFederationToken",// 有道词典翻译
  signInSaveSignIn:"signIn/saveSignIn",// 签到
  vrCreateQrcode4Poster:"vs/createQrcode4Poster",// 生成海报  
  colSaveCol:"col/saveCol",// 收藏单词
  colDelCol:"col/delCol",// 取消收藏单词 
  vrSaveVoiceResult:"vr/saveVoiceResult",// 保存跟读结果信息
  statisticsData:"vr/statisticsData",  
  vrNewestvr:"vr/newestvr",
  getVoiceByVrId:"vr/getVoiceByVrId", 
  getVrListByVSid:"vr/getVrListByVSid",// 查询跟读集合方便查看纠音
  vrGetSharerInfoByvrId:"vr/getSharerInfoByvrId",// 分享进入，还需要查询语音分享者信息，头像昵称
  getvrandteaInfo:"vr/getvrandteaInfo",// 分享进入，还需要查询语音分享者信息，头像昵称  
  vrHasRepeate:"vr/hasRepeate",// 是否跟读过
  getRepeatRecords:"vr/getRepeatRecords", 
  saveVoiceResult4Challenge:"vr/saveVoiceResult4Challenge", 
  getHomeworkList4minAppNextorPrev:"homework/getHomeworkList4minAppNextorPrev",//  根据openId查询班级历史作业 小程序端 上一句，下一句  
  getNotificationInfo:"notification/getNotificationInfo",// 小程序页面通知
  baPreCorrect:"ba/preCorrect",// 预约纠音
  arenaInvitationCard:"arena/invitationCard",// 和朋友一起练
  arenaInitDataByArenaId:"arena/initDataByArenaId",// 和朋友一起练
  gradeList:"grade/getGradeTypeList",
  getGradeTypeListByAdult:"grade/getGradeTypeListByAdult",  
  getBooksListByGradeId:"book/getBooksListByGradeId",
  getVSListBychapteId:"book/getVSListBychapteId",
  getAllVSBybookId:"book/getAllVSBybookId",
  getBookAndVSinfoByopenId:"book/getBookAndVSinfoByopenId", 
  getMycol:"col/getMycol",  
  getCorrectResultList:"correct/getCorrectResultList",   
  surplusIntegral:"integral/surplusIntegral",// 查询积分剩余
  getRewardRecordListByTeacherId:"rr/getRewardRecordListByTeacherId",
  getCorrectRecordByBatch:"pushMsg/getCorrectRecordByBatch", 
  updateHasConsumeIntegral:"cr/updateHasConsumeIntegral", 
  updateCRStatus:"pushMsg/updateCRStatus", 
  preGetData:"homework/preGetData", 
  getClassByteaOpenId:"class/getClassByteaOpenId", 
  delClass4min:"class/delClass4min", 
  teapushmsg4Stu:"pushMsg/teapushmsg4Stu", 
  teapushmsg:"pushMsg/teapushmsg", 
  getTeaAllHomeworkByhwid:"homework/getTeaAllHomeworkByhwid", 
  getRepeated:"homework/getRepeated", 
  getNoRepeat:"homework/getNoRepeat", 
  getTeaAllHomework:"homework/getTeaAllHomework", 
  getEAlistByNo:"ea/getEAlistByNo", 
  saveStu:"student/saveStu", 
  getClassById:"class/getClassById", 
  joinClasFromInvitation:"arc/joinClasFromInvitation", 
  teacherInfoHasExist:"teacher/teacherInfoHasExist",   
  saveInvitationTeainfo:"teacher/saveInvitationTeainfo",
  getTeacherRanking:"teacher/getTeacherRanking",// 老师列表
  getSubscriber:"ba/getWaitingCorrectList",
  miniappUpdate:"miniapp/update",
  organizationSave:"organization/save",// 小程序端，老师注册
};
const commonAPI = {
  // 首页查询列表
  repeatHistoryPush(data){
    return weRequest.request({
      showLoading: true,url:API.repeatHistoryPush,
      method:'get',
      data:data
    })
  },
  statisticsData(data){
    return weRequest.request({
      showLoading: true,url:API.statisticsData,
      method:'post',
      data
    })
  },

  getSubscribeMsg(data){
    return weRequest.request({
      showLoading: true,url:API.getSubscribeMsg,
      method:'get',
      data:data
    })
  },
  vsTranslation(data){
    return weRequest.request({
      showLoading: true,url:API.vsTranslation,
      method:'POST',
      data
    })
  },
  getHomeworkList4minAppNextorPrev(data){
    return weRequest.request({
      showLoading: true,url:API.getHomeworkList4minAppNextorPrev,
      method:'get',
      data:data
    })
  },
  
  signInSaveSignIn(data){
    return weRequest.request({
      showLoading: true,url:API.signInSaveSignIn,
      method:'post', 
      data
    })
  },
  vrSaveVoiceResult(data){
    return weRequest.request({
      showLoading: true,url:API.vrSaveVoiceResult,
      method:'post', 
      data
    })
  }, 
  vrHasRepeate(data){
    return weRequest.request({
      showLoading: true,url:API.vrHasRepeate,
      method:'get', 
      data:data
    })
  }, 
  vrCreateQrcode4Poster(data){
    return weRequest.request({
      showLoading: true,url:API.vrCreateQrcode4Poster,
      method:'post', 
      data
    })
  }, 
  colSaveCol(data){
    return weRequest.request({
      showLoading: true,url:API.colSaveCol,
      method:'post', 
      data
    })
  }, 
  colDelCol(data){
    return weRequest.request({
      showLoading: true,url:API.colDelCol,
      method:'post', 
      data
    })
  }, 
  getBookAndVSinfoByopenId(data){
    return weRequest.request({
      showLoading: true,url:API.getBookAndVSinfoByopenId,
      method:'get', 
      data:data
    })
  }, 
  getVrListByVSid(data){
    return weRequest.request({
      showLoading: true,url:API.getVrListByVSid,
      method:'get', 
      data:data
    })
  }, 
  getTeacherRanking(data){
    return weRequest.request({
      showLoading: true,url:API.getTeacherRanking,
      method:'get', 
      data:data
    })
  }, 
  baPreCorrect(data){
    return weRequest.request({
      showLoading: true,url:API.baPreCorrect,
      method:'post', 
      data
    })
  }, 
  arenaInvitationCard(data){
    return weRequest.request({
      showLoading: true,url:API.arenaInvitationCard,
      method:'post', 
      data
    })
  },
  arenaInitDataByArenaId(data){
    return weRequest.request({
      showLoading: true,url:API.arenaInitDataByArenaId,
      method:'get', 
      data:data
    })
  },
  vrGetSharerInfoByvrId(data){
    return weRequest.request({
      showLoading: true,url:API.vrGetSharerInfoByvrId,
      method:'get', 
      data:data
    })
  },
  vrNewestvr(data){
    return weRequest.request({
      showLoading: true,url:API.vrNewestvr,
      method:'get', 
      data:data
    })
  },
  gradeList(data){
    return weRequest.request({
      showLoading: true,url:API.gradeList,
      method:'get', 
      data:data
    })
  },
  getBooksListByGradeId(data){
    return weRequest.request({
      showLoading: true,url:API.getBooksListByGradeId,
      method:'get', 
      data:data
    })
  },
  getVSListBychapteId(data){
    return weRequest.request({
      showLoading: true,url:API.getVSListBychapteId,
      method:'get', 
      data:data
    })
  },
  getAllVSBybookId(data){
    return weRequest.request({
      showLoading: true,url:API.getAllVSBybookId,
      method:'get', 
      data:data
    })
  },
  getRepeatRecords(data){
    return weRequest.request({
      showLoading: true,url:API.getRepeatRecords,
      method:'get', 
      data:data
    })
  },
  getMycol(data){
    return weRequest.request({
      showLoading: true,url:API.getMycol,
      method:'get', 
      data:data
    })
  },
  getCorrectResultList(data){
    return weRequest.request({
      showLoading: true,url:API.getCorrectResultList,
      method:'get', 
      data:data
    })
  },
  surplusIntegral(data){
    return weRequest.request({
      showLoading: true,url:API.surplusIntegral,
      method:'get', 
      data:data
    })
  },
  getRewardRecordListByTeacherId(data){
    return weRequest.request({
      showLoading: true,url:API.getRewardRecordListByTeacherId,
      method:'get', 
      data:data
    })
  },
  getCorrectRecordByBatch(data){
    return weRequest.request({
      showLoading: true,url:API.getCorrectRecordByBatch,
      method:'get', 
      data:data
    })
  },
  preGetData(data){
    return weRequest.request({
      showLoading: true,url:API.preGetData,
      method:'get', 
      data:data
    })
  },
  updateHasConsumeIntegral(data){
    return weRequest.request({
      showLoading: true,url:API.updateHasConsumeIntegral,
      method:'post', 
      data
    })
  },
  updateCRStatus(data){
    return weRequest.request({
      showLoading: true,url:API.updateCRStatus,
      method:'post', 
      data
    })
  },
  getClassByteaOpenId(data){
    return weRequest.request({
      showLoading: true,url:API.getClassByteaOpenId,
      method:'get', 
      data:data
    })
  },
  delClass4min(data){
    return weRequest.request({
      showLoading: true,url:API.delClass4min,
      method:'get', 
      data:data
    })
  },
  
  getVoiceByVrId(data){
    return weRequest.request({
      showLoading: true,url:API.getVoiceByVrId,
      method:'get', 
      data:data
    })
  },
  teapushmsg4Stu(data){
    return weRequest.request({
      showLoading: true,url:API.teapushmsg4Stu,
      method:'get', 
      data:data
    })
  },
  teapushmsg(data){
    return weRequest.request({
      showLoading: true,url:API.teapushmsg,
      method:'get', 
      data:data
    })
  },  
  getTeaAllHomeworkByhwid(data){
    return weRequest.request({
      showLoading: true,url:API.getTeaAllHomeworkByhwid,
      method:'get', 
      data:data
    })
  },
  getRepeated(data){
    return weRequest.request({
      showLoading: true,url:API.getRepeated,
      method:'get', 
      data:data
    })
  },
  getNoRepeat(data){
    return weRequest.request({
      showLoading: true,url:API.getNoRepeat,
      method:'get', 
      data:data
    })
  },
  getTeaAllHomework(data){
    return weRequest.request({
      showLoading: true,url:API.getTeaAllHomework,
      method:'get', 
      data:data
    })
  },
  getEAlistByNo(data){
    return weRequest.request({
      showLoading: true,url:API.getEAlistByNo,
      method:'get', 
      data:data
    })
  },
  saveStu(data){
    return weRequest.request({
      showLoading: true,url:API.saveStu,
      method:'post', 
      data:data
    })
  },
  getClassById(data){
    return weRequest.request({
      showLoading: true,url:API.getClassById,
      method:'post', 
      data
    })
  },
  joinClasFromInvitation(data){
    return weRequest.request({
      showLoading: true,url:API.joinClasFromInvitation,
      method:'get', 
      data:data
    })
  },
  teacherInfoHasExist(data){
    return weRequest.request({
      showLoading: true,url:API.teacherInfoHasExist,
      method:'get', 
      data:data
    })
  },
  saveInvitationTeainfo(data){
    return weRequest.request({
      showLoading: true,url:API.saveInvitationTeainfo,
      method:'get', 
      data:data
    })
  },
  getSubscriber(data){
    return weRequest.request({
      showLoading: true,url:API.getSubscriber,
      method:'get', 
      data:data
    })
  },
  getvrandteaInfo(data){
    return weRequest.request({
      showLoading: true,url:API.getvrandteaInfo,
      method:'get', 
      data:data
    })
  },
  getGradeTypeListByAdult(data){
    return weRequest.request({
      showLoading: true,url:API.getGradeTypeListByAdult,
      method:'get', 
      data:data
    })
  },  
  saveVoiceResult4Challenge(data){
    return weRequest.request({
      showLoading: true,url:API.saveVoiceResult4Challenge,
      method:'post', 
      data
    })
  },
  getFederationToken(data){
    return weRequest.request({
      showLoading: true,url:API.getFederationToken,
      method:'get', 
      data:data
    })
  },
  getNotificationInfo(data){
    return weRequest.request({
      showLoading: true,url:API.getNotificationInfo,
      method:'get', 
      data:data
    })
  },
  hasExitWXInfo(data){
    return weRequest.request({
      showLoading: true,url:API.hasExitWXInfo,
      method:'get', 
      data:data
    })
  },
  miniappUpdate(data){
    return weRequest.request({
      showLoading: false,url:API.miniappUpdate,
      method:'POST', 
      data
    })
  },

  organizationSave(data){
    return weRequest.request({
      showLoading: false,url:API.organizationSave,
      method:'POST', 
      data
    })
  },  
 
}
module.exports =  commonAPI;